import globals from "globals";
import pluginJs from "@eslint/js";
import pluginVue from "eslint-plugin-vue";

export default [
	{
		files: ["**/*.{js,mjs,cjs,vue}"]
	},
	{
		languageOptions: { 
			globals: globals.browser 
		}
	},
	{
		languageOptions: {
			globals: {
				uni: 'readonly',
				require: 'readonly',
			}
		}
	},
	pluginJs.configs.recommended,
	...pluginVue.configs["flat/essential"],
	{
		ignores: [
			".hbuilderx",
			".husky",
			"dist/*",
			"type/*",
			"node_modules/*",
			"uni_modules/*",
			"jest.config.js",
			"env.js",
			"*.md",
			"*.woff",
			"*.ttf"
		]
	},
	{
		rules: {
			'vue/no-unused-vars': 'off',
			"vue/multi-word-component-names": "off",
		}
	},
];